@extends('admin.layout')
@section('content')

<!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                商品属性管理
                <small>添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 后台主页</a></li>
                <li><a href="#">商品属性管理</a></li>
                <li class="active">添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加商品属性</h3>
                        </div><!-- /.box-header -->

                        
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/goodsattrs/insert') }}" method="post" enctype="multipart/form-data">
                            {{csrf_field()}}
                            <div class="box-body">

                                <div class="form-group">
                                    <label>商品分类</label>
                                    <select  name="cate_id" class="form-control">
                                        @foreach($data as $cate)
                                          
                                        <option value="{{ $cate -> id }}" 

                                            @if( $cate -> c <= 1 )
                                                disabled = "disabled"
                                            @endif

                                          >{{ $cate -> name }}</option>

                                        @endforeach

                                       <!--  <option value="10"
                                         @if(!empty($request['num']) && $request['num'] == 10)
                                           selected="selected"
                                         @endif
                                       >10</option> -->
                                    </select>
                                </div>


                                <div class="form-group">
                                    <label for="exampleInputUsername">商品属性名</label>
                                    <input type="text" name="attr_name" value="{{ old('name') }}"class="form-control" 
                                    id="exampleInputUsername"
                                           placeholder="请输入商品属性名">
                                </div>

                                <div class="form-group">
                                    <label for="exampleInputUsername">商品属性值</label>
                                    <input type="text" name="attr_values" value="{{ old('name') }}"class="form-control" id="exampleInputUsername"
                                           placeholder="请输入商品属性值">
                                </div>

                                

                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">添加</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                <!-- right column -->
                </div><!--/.col (right) -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->

@endsection